home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aplicaciones Windows
/
Aplicaciones Windows.iso
/
Educa
/
EX.ZIP
/
EXTUT.DOC
< prev
next >
Wrap
Text File
|
1997-03-07
|
27KB
|
767 lines
Tutorial
for Ex 1.40
=============
(Tutorial Version 1.40)
This is a series of step-by-step examples, illustrating how to
access some of the features of Ex. The series is far from being
complete and will not replace the program manual, which remains
the required reading anyway.
This tutorial, (c) 1995 by J.A.Wrotniak, is available
exclusively to the registered users of Ex and should not be re-
distributed in any form.
Table of Contents
1. The basics
1.1. Adding two and two
1.2. Computing a longer expression
1.3. Setting display precision
1.4. Correcting errors
1.5. Cutting and pasting
2. Operations on units
2.1. Unit conversion
2.2. Operations on feet and inches
2.3. Degrees, minutes and seconds
3. Function plotting
3.1. Plotting a single function
3.2. Adding functions to a plot
4. Numeric operations
4.1. Computing an integral
4.2. Computing a derivative
4.3. Computing a sum
4.4. Solving an equation
5. User-defined functions
5.1. Defining and using a function
5.2. Nesting defined functions
6. Data buffer operations
6.1. One-variable statistics
6.2. Computations on data buffer
6.3. Filling the X buffer with simulated data
6.4. Histogramming the data
6.5. Overlaying a function plot on a histogram
7. Linear algebra
7.1. Solving a system of linear equations
7.2. Testing the result: multiplying a matrix by a vector
7.3. Changing the vector/matrix display format
1. The basics
1.1. Adding two and two
At this moment the long line at the top of the Main Screen
should be empty. If this is not the case, press the Esc key.
Now, type
2+2
and press Enter (on some computers marked as Return). Your line
will be reformatted to
2+2=@
and the result will be shown in the Variable Field "@" and in
the Last Result Field just below your expression. Because you
have not specified where you want the result stored, Ex used the
"default variable", @. This is to save you some typing.
Note that the upper result is shown without, and the lower -
with trailing zeros. Ex will drop the insignificant zeros in the
Last Result Field.
What if you want the result stored in another variable, e.g., X?
Press the Backspace key (sometimes denoted with a long left
arrow). The @ variable at the right side of the expression will
be erased. Type "X" (without quotes, lower or upper case) and
press Enter again. Done.
1.2. Computing a longer expression
Now let us do something more ambitious, evaluate an expression
using functions. We will try to compute a side of a triangle
given the two other sides (2.75 and 3.6) and the angle between
them (72 degrees).
First, we need to switch into the Degree mode. Look near the
right of the Status Line. When you first run Ex, there will be
an "R" there, meaning that the program is in the Radian mode. To
switch, press the F2 function key, marked as [Set]. You will see
that the F-key menu at the bottom has changed. Press the F-key
marked as [Deg]. An arrow will appear left to its menu
abbreviation, and "R" will change to "D". We are in the Degree
mode. You may go back to the TOP Menu by pressing [TOP].
Clear the Expression Line by pressing Esc, type
sqr(sq 2.75+sq 3.6-2*2.75*3.6*cos 72)
and press Enter. The result will be 4.345683051 (with the
default accuracy of 12 significant digits).
This is not the best way to do it: numeric constants are
repeated, and any changes to the data will require quite lot of
re-editing. Let us store the data in variables first; let us
also use the square operator (not function) and change the angle
to 72 degrees, 12 minutes and 31 seconds.
Clear the display with Esc. Type
2.75=a
Press Enter, clear again, type
3.6=b
and press Enter and Escape. Your values will be shown in the
Variable Fields. Now enter
72°12'31"=g
using Alt-D, Alt-M and Alt-S key combinations for degree, minute
and second symbols.
After clearing the display again, type in the following
expression (use Alt-2 for the square symbol); you do not have to
be very neat about it:
sqr(a²+b²-2abcosg=c
After pressing Enter you will have the value computed and stored
in C. Note that Ex has also re-formatted your input to
sqr(A²+B²-2AB·cos G)=C
by adding the missing right parenthesis, converting variables to
upper case and inserting the implied multiplication operator
between "B" and "cos".
(By the way, if you are entering angular values in degrees,
minutes and seconds as shown above, you do not need be in the
Deg mode; the Rad mode would be OK, too.)
1.3. Setting display precision
The result of the last example was displayed with 12 significant
digits of accuracy. This can be easily changed.
Go to the SET Menu (if you are at the TOP Menu, just press
[Set], otherwise press [TOP] first). Now press [Dig]; from the
new menu choose [Res]. Enter 16, press Enter. Now you have 16
significant digits of your result shown.
Setting the number of significant digits corresponds to a given
relative accuracy. A desired absolute accuracy can be defined by
setting the number of digits after the decimal point.
To do this, press [Res] in the DIG Menu again and enter the
number of digits preceded by a point, e.g., ".6". Now your
result will be shown as 3.804283, although its internally stored
value has not changed.
1.4. Correcting errors
Let us assume that you want to compute just 2A times cos G, with
the data as set above. Press Escape, type
2acosg=u
and press Enter. Not only will you get an error message, but
your reformatted input will be shown as
2·acos G=U
and this is not what you wanted (acos is the arc cosine
function). Press any key to remove the message, and use the left
arrow key to position the cursor over the "c". Hit Space to
separate "a" from "c". Now, that is better. Hit Return.
Of course, the problem would have been avoided if you typed in
2Acosg=u
as uppercase letters are always treated as variables and never
merged into function names.
1.5. Cutting and pasting
In the last example, by pressing Escape we have cleared the
previous expression, and now we may need it. Good news: the old
expression is not lost, being stored in the paste buffer.
Press the Insert key (Shift-Del on the HP95LX). The new
expression will be replaced with the old one. Press Insert
again, and again: you can see the paste buffer swapped with the
display.
Now you should have the older expression displayed; if this is
not the case, press Insert again. The newer expression can be
also pasted into an empty line. To do it, first press the down
arrow key. The line number near top left will change to "2", and
the expression line will be empty. Press Escape; you will see
the buffer pasted into the line. The up arrow will bring you
back to Line 1.
2. Operations on units
2.1. Unit conversion
Let us convert 60 miles per hour into meters per second. To do
it, clear the display by pressing Esc, type
60
and press the Enter key. The value of 60 will be stored in
variable @. Now get to the CON (Conversion) Menu by pressing
[Con], and then press [Uni]. A pop-up "CONVERT" menu will
appear. Highlight "Speed" by using the down arrow key and press
Enter. Another menu, "FROM" will show up with a choice of mass
units. Use the arrow keys to highlight "miles/hour" and press
Enter. In the following "TO" menu select "meters/second" in the
same way. The result (26.82...) will be stored, again, in the
Default Variable, @.